package com.lokyiu.mybible.db.sqlite;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DatabaseHandler extends SQLiteOpenHelper {
	
	private static final int DATABASE_VERSION = 1;
	
	private static final String DATABASE_NAME = "biblecontent";
	
	private DBDefinition dbDefinition;
	
	public DatabaseHandler(Context context, String databaseName, CursorFactory cursorFactory, int version) {
		super(context, databaseName, cursorFactory, version);
	}
	
	public DatabaseHandler(Context context) {
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
	}
	
	@Override
	public void onCreate(SQLiteDatabase db) {
		dbDefinition.onCreate(db);
	}
	
	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		dbDefinition.onUpgrade(db);
	}
}
